﻿@model IEnumerable<ICDA.Web.Models.LeaveModel>
@{
    ViewBag.Title = "Leave";
}
<script type="text/javascript">
    //            $(".tabs .tab[id^=tab_menu]").click(function () {
    //                var curMenu = $(this);
    //                $(".tabs .tab[id^=tab_menu]").removeClass("selected");
    //                curMenu.addClass("selected");

    //                var index = curMenu.attr("id").split("tab_menu_")[1];
    //                $(".curvedContainer .tabcontent").css("display", "none");
    //                $(".curvedContainer #tab_content_" + index).css("display", "block");
    //            });
</script>
<div class="tabscontainer">
     <div class="tabs">
        <div class="tab  selected first" id="tab_menu_1">
            <div class="link">@Html.ActionLink("Leave Apply", "LeaveApply", "LeaveManagement")</div>
            <div class="arrow"></div>
        </div>
        <div class="tab last" id="tab_menu_2">
            <div class="link">@Html.ActionLink("View Leave", "Edit", "LeaveManagement")</div>
            <div class="arrow"></div>
        </div>
         <div class="tab last" id="tab_menu_3">
            <div class="link">@Html.ActionLink("Edit Leave", "Leave", "LeaveManagement")</div>
            <div class="arrow">
            </div>
        </div>
    </div>
    <div class="curvedContainer">
        <div class="tabcontent" id="tab_content_2">
            <table id="table-6" cellpadding="0" cellspacing="0">
                <thead>
                    <tr>
                        <th>
                            ID
                        </th>
                        <th>
                            Leave Start Date
                        </th>
                        <th>
                            Leave End Date
                        </th>
                        <th>
                            Leave Type
                        </th>
                        <th>
                            Day Type
                        </th>
                        <th>
                            Leave Name
                        </th>
                        <th>
                        </th>
                    </tr>
                </thead>
                <tbody>
                    @if (Model != null)
                    {
                        foreach (var item in Model)
                        {
                        <tr>
                            <td>
                                @Html.DisplayFor(modelItem => item.ID)
                            </td>
                            <td>
                                @Html.DisplayFor(modelItem => item.LeaveStartDate)
                            </td>
                            <td>
                                @Html.DisplayFor(modelItem => item.LeaveEndDate)
                            </td>
                            <td>
                                @Html.DisplayFor(modelItem => item.LeaveType)
                            </td>
                            <td>
                                @Html.DisplayFor(modelItem => item.DayType)
                            </td>
                            <td>
                                @Html.DisplayFor(modelItem => item.LeaveName)
                            </td>
                            <td>
                                @Html.ActionLink("Edit", "Leave", new { id = item.ID }) |
                                @Html.ActionLink("Delete", "DeleteLeave", new { id = item.ID })
                            </td>
                        </tr>
                        }
                    }
                </tbody>
            </table>
        </div>
    </div>
</div>
